home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_bas / t2win_32.zip / _STRING.FRM < prev    next >
Text File  |  1996-05-14  |  88KB  |  2,956 lines

  1. VERSION 4.00
  2. Begin VB.Form frmString 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "String"
  5.    ClientHeight    =   5235
  6.    ClientLeft      =   330
  7.    ClientTop       =   2385
  8.    ClientWidth     =   7785
  9.    Height          =   5640
  10.    Left            =   270
  11.    MaxButton       =   0   'False
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   5235
  14.    ScaleWidth      =   7785
  15.    ShowInTaskbar   =   0   'False
  16.    Top             =   2040
  17.    Width           =   7905
  18.    Begin VB.TextBox txt_Result 
  19.       BackColor       =   &H00C0C0C0&
  20.       BorderStyle     =   0  'None
  21.       Height          =   4005
  22.       Left            =   105
  23.       Locked          =   -1  'True
  24.       MultiLine       =   -1  'True
  25.       ScrollBars      =   2  'Vertical
  26.       TabIndex        =   8
  27.       Top             =   630
  28.       Width           =   7575
  29.    End
  30.    Begin Threed.SSPanel SSPanel1 
  31.       Align           =   1  'Align Top
  32.       Height          =   480
  33.       Left            =   0
  34.       TabIndex        =   0
  35.       Top             =   0
  36.       Width           =   7785
  37.       _Version        =   65536
  38.       _ExtentX        =   13732
  39.       _ExtentY        =   847
  40.       _StockProps     =   15
  41.       ForeColor       =   -2147483640
  42.       BackColor       =   12632256
  43.       Begin VB.ComboBox cmb_Function 
  44.          Height          =   315
  45.          Left            =   1365
  46.          TabIndex        =   1
  47.          Top             =   90
  48.          Width           =   5100
  49.       End
  50.       Begin Threed.SSCommand cmdNP 
  51.          Height          =   300
  52.          Index           =   1
  53.          Left            =   7455
  54.          TabIndex        =   10
  55.          Top             =   90
  56.          Width           =   255
  57.          _Version        =   65536
  58.          _ExtentX        =   450
  59.          _ExtentY        =   529
  60.          _StockProps     =   78
  61.          Caption         =   ">"
  62.          BevelWidth      =   1
  63.          Font3D          =   3
  64.          RoundedCorners  =   0   'False
  65.          Outline         =   0   'False
  66.       End
  67.       Begin Threed.SSCommand cmdNP 
  68.          Height          =   300
  69.          Index           =   0
  70.          Left            =   6615
  71.          TabIndex        =   9
  72.          Top             =   90
  73.          Width           =   255
  74.          _Version        =   65536
  75.          _ExtentX        =   450
  76.          _ExtentY        =   529
  77.          _StockProps     =   78
  78.          Caption         =   "<"
  79.          BevelWidth      =   1
  80.          Font3D          =   3
  81.          RoundedCorners  =   0   'False
  82.          Outline         =   0   'False
  83.       End
  84.       Begin VB.Label Label2 
  85.          Caption         =   "&Select a function"
  86.          Height          =   255
  87.          Left            =   90
  88.          TabIndex        =   3
  89.          Top             =   120
  90.          Width           =   1275
  91.       End
  92.       Begin Threed.SSCommand SSCommand1 
  93.          Default         =   -1  'True
  94.          Height          =   300
  95.          Left            =   6930
  96.          TabIndex        =   2
  97.          Top             =   90
  98.          Width           =   465
  99.          _Version        =   65536
  100.          _ExtentX        =   820
  101.          _ExtentY        =   529
  102.          _StockProps     =   78
  103.          Caption         =   "&Go"
  104.          BevelWidth      =   1
  105.          RoundedCorners  =   0   'False
  106.          Outline         =   0   'False
  107.       End
  108.    End
  109.    Begin Threed.SSPanel SSPanel2 
  110.       Align           =   2  'Align Bottom
  111.       Height          =   465
  112.       Left            =   0
  113.       TabIndex        =   4
  114.       Top             =   4770
  115.       Width           =   7785
  116.       _Version        =   65536
  117.       _ExtentX        =   13732
  118.       _ExtentY        =   820
  119.       _StockProps     =   15
  120.       BackColor       =   12632256
  121.       Begin VB.TextBox Text1 
  122.          Height          =   285
  123.          Left            =   1440
  124.          TabIndex        =   6
  125.          Tag             =   "A/BC/DEF/GHIJ/KLMNOP/"
  126.          Top             =   90
  127.          Width           =   5370
  128.       End
  129.       Begin Threed.SSCommand SSCommand2 
  130.          Height          =   285
  131.          Left            =   6885
  132.          TabIndex        =   7
  133.          Top             =   90
  134.          Width           =   825
  135.          _Version        =   65536
  136.          _ExtentX        =   1455
  137.          _ExtentY        =   503
  138.          _StockProps     =   78
  139.          Caption         =   "&Reset"
  140.          BevelWidth      =   1
  141.          Outline         =   0   'False
  142.       End
  143.       Begin VB.Label Label1 
  144.          Caption         =   "&Enter a test string"
  145.          Height          =   255
  146.          Left            =   90
  147.          TabIndex        =   5
  148.          Top             =   120
  149.          Width           =   1275
  150.       End
  151.    End
  152. End
  153. Attribute VB_Name = "frmString"
  154. Attribute VB_Creatable = False
  155. Attribute VB_Exposed = False
  156. Option Explicit
  157. Option Base 1
  158.  
  159. Private Const Iteration = 250
  160.  
  161. Dim IsLoaded         As Integer
  162.  
  163. Dim TimerStartOk     As Integer
  164. Dim TimerCloseOk     As Integer
  165.  
  166. Dim TimerHandle      As Integer
  167. Dim TimerValue       As Long
  168.  
  169. Private Sub cmdNP_Click(Index As Integer)
  170.  
  171.    Call sub_NextPrev(cmb_Function, Index)
  172.  
  173. End Sub
  174.  
  175.  
  176. Private Sub cmb_Function_Click()
  177.    
  178.    If (IsLoaded = False) Then Exit Sub
  179.    
  180.    Call cDisableFI(mdiT2W.Picture1)
  181.    
  182.    SSPanel2.Visible = True
  183.    
  184.    txt_Result = ""
  185.    
  186.    DoEvents
  187.    
  188.    Select Case cmb_Function.ListIndex
  189.       Case 0
  190.          Call TestOneCharFromLeft
  191.       Case 1
  192.          Call TestOneCharFromRight
  193.       Case 2
  194.          Call TestBlockCharFromLeft
  195.       Case 3
  196.          Call TestBlockCharFromRight
  197.       Case 4
  198.          Call TestGetIn
  199.       Case 5
  200.          Call TestGetInR
  201.       Case 6
  202.          Call TestGetInPart
  203.       Case 7
  204.          Call TestGetInPartR
  205.       Case 8
  206.          Call TestGetBlock
  207.       Case 9
  208.          Call TestInsertChars
  209.       Case 10
  210.          Call TestInsertByMask
  211.       Case 11
  212.          Call TestInsertBlocks
  213.       Case 12
  214.          Call TestInsertBlocksBy
  215.       Case 13
  216.          Call TestRemoveOneChar
  217.       Case 14
  218.          Call TestRemoveBlockChar
  219.       Case 15
  220.          Call TestTokenIn
  221.       Case 16
  222.          SSPanel2.Visible = False
  223.          Call TestOrTokenX
  224.       Case 17
  225.          SSPanel2.Visible = False
  226.          Call TestAndTokenX
  227.       Case 18
  228.          Call TestReverse
  229.       Case 19
  230.          Call TestMixChars
  231.       Case 20
  232.          Call TestScrollX
  233.       Case 21
  234.          Call TestChangeChars
  235.       Case 22
  236.          Call TestChangeCharsUntil
  237.       Case 23
  238.          Call TestCheckChars
  239.       Case 24
  240.          Call TestFilterChars
  241.       Case 25
  242.          Call TestFilterNotChars
  243.       Case 26
  244.          Call TestFilterBlocks
  245.       Case 27
  246.          Call TestResizeString
  247.       Case 28
  248.          Call TestResizeStringAndFill
  249.       Case 29
  250.          Call TestCreateAndFill
  251.       Case 30
  252.          Call TestFill
  253.       Case 31
  254.          Call TestLrc
  255.       Case 32
  256.          Call TestCompress
  257.       Case 33
  258.          SSPanel2.Visible = False
  259.          Call TestCompressTab
  260.       Case 34
  261.          Call TestCompact
  262.       Case 35
  263.          Call TestAlign
  264.       Case 36
  265.          Call TestProperName
  266.       Case 37
  267.          Call TestProperName2
  268.       Case 38
  269.          Call TestStringSAR
  270.       Case 39
  271.          Call TestToHexa
  272.       Case 40
  273.          SSPanel2.Visible = False
  274.          Call TestRomanArabic
  275.       Case 41
  276.          Call TestAsciiEbcdic
  277.       Case 42
  278.          SSPanel2.Visible = False
  279.          Call TestPatternMatch
  280.       Case 43
  281.          SSPanel2.Visible = False
  282.          Call TestPatternExtMatch
  283.       Case 44
  284.          Call TestCheckNumericity
  285.       Case 45
  286.          Call TestAlphaDigit
  287.       Case 46
  288.          SSPanel2.Visible = False
  289.          Call TestH2X
  290.       Case 47
  291.          Call TestSortStr
  292.       Case 48
  293.          Call TestMorse
  294.    End Select
  295.  
  296.    DoEvents
  297.    Call cEnableFI(mdiT2W.Picture1)
  298.    
  299. End Sub
  300.  
  301.  
  302.  
  303. Private Sub Form_Activate()
  304.  
  305.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  306.  
  307. End Sub
  308.  
  309. Private Sub Form_Load()
  310.  
  311.    IsLoaded = False
  312.    
  313.    Show
  314.  
  315.    Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1)
  316.  
  317.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_string.t2w")
  318.    
  319.    IsLoaded = True
  320.    
  321. End Sub
  322.  
  323. Private Sub SSCommand1_Click()
  324.    
  325.    Call cmb_Function_Click
  326.    
  327. End Sub
  328.  
  329.  
  330.  
  331.  
  332. Private Sub TestOneCharFromLeft()
  333.    
  334.    Dim intResult        As Integer
  335.    Dim strResult        As String
  336.    Dim strDisplay       As String
  337.    
  338.    Dim i                As Integer
  339.    
  340.    Dim Str1             As String
  341.    
  342.    intResult = 0
  343.    
  344.    strResult = ""
  345.    strDisplay = ""
  346.      
  347.    Str1 = Text1.Text
  348.    
  349.    strDisplay = strDisplay & "The 3,7,1,21,14 chars from left of '" & Str1 & "' are " & vbCrLf & vbCrLf
  350.  
  351.    strDisplay = strDisplay & "03: '" & cOneCharFromLeft(Str1, 3) & "'" & vbCrLf
  352.    strDisplay = strDisplay & "07: '" & cOneCharFromLeft(Str1, 7) & "'" & vbCrLf
  353.    strDisplay = strDisplay & "01: '" & cOneCharFromLeft(Str1, 1) & "'" & vbCrLf
  354.    strDisplay = strDisplay & "21: '" & cOneCharFromLeft(Str1, 21) & "'" & vbCrLf
  355.    strDisplay = strDisplay & "14: '" & cOneCharFromLeft(Str1, 14) & "'" & vbCrLf
  356.    
  357.    txt_Result = strDisplay
  358.  
  359.    'time the function
  360.  
  361.    TimerHandle = cTimerOpen()
  362.    TimerStartOk = cTimerStart(TimerHandle)
  363.    
  364.    For i = 1 To Iteration
  365.       strResult = cOneCharFromLeft(Str1, 3)
  366.    Next i
  367.    
  368.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  369.    
  370.    TimerCloseOk = cTimerClose(TimerHandle)
  371.  
  372. End Sub
  373.  
  374. Private Sub SSCommand2_Click()
  375.    
  376.    Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1)
  377.    
  378.    Call SSCommand1_Click
  379.    
  380. End Sub
  381.  
  382.  
  383.  
  384.  
  385.  
  386. Private Sub TestOneCharFromRight()
  387.    
  388.    Dim intResult        As Integer
  389.    Dim strResult        As String
  390.    Dim strDisplay       As String
  391.    
  392.    Dim i                As Integer
  393.    
  394.    Dim Str1             As String
  395.    
  396.    intResult = 0
  397.    
  398.    strResult = ""
  399.    strDisplay = ""
  400.      
  401.    Str1 = Text1.Text
  402.    
  403.    strDisplay = strDisplay & "The 3,7,1,21,14 chars from right of '" & Str1 & "' are " & vbCrLf & vbCrLf
  404.  
  405.    strDisplay = strDisplay & "03: '" & cOneCharFromRight(Str1, 3) & "'" & vbCrLf
  406.    strDisplay = strDisplay & "07: '" & cOneCharFromRight(Str1, 7) & "'" & vbCrLf
  407.    strDisplay = strDisplay & "01: '" & cOneCharFromRight(Str1, 1) & "'" & vbCrLf
  408.    strDisplay = strDisplay & "21: '" & cOneCharFromRight(Str1, 21) & "'" & vbCrLf
  409.    strDisplay = strDisplay & "14: '" & cOneCharFromRight(Str1, 14) & "'" & vbCrLf
  410.    
  411.    txt_Result = strDisplay
  412.  
  413.    'time the function
  414.  
  415.    TimerHandle = cTimerOpen()
  416.    TimerStartOk = cTimerStart(TimerHandle)
  417.    
  418.    For i = 1 To Iteration
  419.       strResult = cOneCharFromRight(Str1, 3)
  420.    Next i
  421.    
  422.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  423.    
  424.    TimerCloseOk = cTimerClose(TimerHandle)
  425.  
  426. End Sub
  427.  
  428. Private Sub TestBlockCharFromLeft()
  429.    
  430.    Dim intResult        As Integer
  431.    Dim strResult        As String
  432.    Dim strDisplay       As String
  433.    
  434.    Dim i                As Integer
  435.    
  436.    Dim Str1             As String
  437.    
  438.    intResult = 0
  439.    
  440.    strResult = ""
  441.    strDisplay = ""
  442.      
  443.    Str1 = Text1.Text
  444.    
  445.    strDisplay = strDisplay & "The 3,7,1,21,14 blocks from left of '" & Str1 & "' are " & vbCrLf & vbCrLf
  446.  
  447.    strDisplay = strDisplay & "03: '" & cBlockCharFromLeft(Str1, 3) & "'" & vbCrLf
  448.    strDisplay = strDisplay & "07: '" & cBlockCharFromLeft(Str1, 7) & "'" & vbCrLf
  449.    strDisplay = strDisplay & "01: '" & cBlockCharFromLeft(Str1, 1) & "'" & vbCrLf
  450.    strDisplay = strDisplay & "21: '" & cBlockCharFromLeft(Str1, 21) & "'" & vbCrLf
  451.    strDisplay = strDisplay & "14: '" & cBlockCharFromLeft(Str1, 14) & "'" & vbCrLf
  452.    
  453.    txt_Result = strDisplay
  454.  
  455.    'time the function
  456.  
  457.    TimerHandle = cTimerOpen()
  458.    TimerStartOk = cTimerStart(TimerHandle)
  459.    
  460.    For i = 1 To Iteration
  461.       strResult = cBlockCharFromLeft(Str1, 3)
  462.    Next i
  463.    
  464.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  465.    
  466.    TimerCloseOk = cTimerClose(TimerHandle)
  467.  
  468. End Sub
  469.  
  470. Private Sub TestBlockCharFromRight()
  471.    
  472.    Dim intResult        As Integer
  473.    Dim strResult        As String
  474.    Dim strDisplay       As String
  475.    
  476.    Dim i                As Integer
  477.    
  478.    Dim Str1             As String
  479.    
  480.    intResult = 0
  481.    
  482.    strResult = ""
  483.    strDisplay = ""
  484.      
  485.    Str1 = Text1.Text
  486.    
  487.    strDisplay = strDisplay & "The 3,7,1,21,14 blocks from right of '" & Str1 & "' are " & vbCrLf & vbCrLf
  488.  
  489.    strDisplay = strDisplay & "03: '" & cBlockCharFromRight(Str1, 3) & "'" & vbCrLf
  490.    strDisplay = strDisplay & "07: '" & cBlockCharFromRight(Str1, 7) & "'" & vbCrLf
  491.    strDisplay = strDisplay & "01: '" & cBlockCharFromRight(Str1, 1) & "'" & vbCrLf
  492.    strDisplay = strDisplay & "21: '" & cBlockCharFromRight(Str1, 21) & "'" & vbCrLf
  493.    strDisplay = strDisplay & "14: '" & cBlockCharFromRight(Str1, 14) & "'" & vbCrLf
  494.    
  495.    txt_Result = strDisplay
  496.  
  497.    'time the function
  498.  
  499.    TimerHandle = cTimerOpen()
  500.    TimerStartOk = cTimerStart(TimerHandle)
  501.    
  502.    For i = 1 To Iteration
  503.       strResult = cBlockCharFromRight(Str1, 3)
  504.    Next i
  505.    
  506.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  507.    
  508.    TimerCloseOk = cTimerClose(TimerHandle)
  509.  
  510. End Sub
  511.  
  512. Private Sub TestGetIn()
  513.    
  514.    Dim intResult        As Integer
  515.    Dim strResult        As String
  516.    Dim strDisplay       As String
  517.    
  518.    Dim i                As Integer
  519.    
  520.    Dim Str1             As String
  521.    Dim Sep1             As String
  522.    
  523.    intResult = 0
  524.    
  525.    strResult = ""
  526.    strDisplay = ""
  527.      
  528.    Str1 = Text1.Text
  529.    
  530.    Sep1 = "/"
  531.    
  532.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  533.  
  534.    strDisplay = strDisplay & "3: '" & cGetIn(Str1, Sep1, 3) & "'" & vbCrLf
  535.    strDisplay = strDisplay & "7: '" & cGetIn(Str1, Sep1, 7) & "'" & vbCrLf
  536.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf
  537.    strDisplay = strDisplay & "5: '" & cGetIn(Str1, Sep1, 5) & "'" & vbCrLf
  538.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf
  539.    strDisplay = strDisplay & "0: '" & cGetIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  540.    
  541.    Sep1 = "G"
  542.    
  543.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  544.  
  545.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf
  546.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  547.    
  548.    Sep1 = "g"
  549.    
  550.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  551.  
  552.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf
  553.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'"
  554.    
  555.    txt_Result = strDisplay
  556.  
  557.    'time the function
  558.  
  559.    TimerHandle = cTimerOpen()
  560.    TimerStartOk = cTimerStart(TimerHandle)
  561.    
  562.    For i = 1 To Iteration
  563.       strResult = cGetIn(Str1, Sep1, 3)
  564.    Next i
  565.    
  566.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  567.    
  568.    TimerCloseOk = cTimerClose(TimerHandle)
  569.  
  570. End Sub
  571.  
  572. Private Sub TestGetInR()
  573.    
  574.    Dim intResult        As Integer
  575.    Dim strResult        As String
  576.    Dim strDisplay       As String
  577.    
  578.    Dim i                As Integer
  579.    
  580.    Dim Str1             As String
  581.    Dim Sep1             As String
  582.    
  583.    intResult = 0
  584.    
  585.    strResult = ""
  586.    strDisplay = ""
  587.      
  588.    Str1 = Text1.Text
  589.    
  590.    Sep1 = "/"
  591.    
  592.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  593.  
  594.    strDisplay = strDisplay & "3: '" & cGetInR(Str1, Sep1, 3) & "'" & vbCrLf
  595.    strDisplay = strDisplay & "7: '" & cGetInR(Str1, Sep1, 7) & "'" & vbCrLf
  596.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf
  597.    strDisplay = strDisplay & "5: '" & cGetInR(Str1, Sep1, 5) & "'" & vbCrLf
  598.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf
  599.    strDisplay = strDisplay & "0: '" & cGetInR(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  600.    
  601.    Sep1 = "G"
  602.    
  603.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  604.  
  605.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf
  606.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  607.    
  608.    Sep1 = "g"
  609.    
  610.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  611.  
  612.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf
  613.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'"
  614.    
  615.    txt_Result = strDisplay
  616.  
  617.    'time the function
  618.  
  619.    TimerHandle = cTimerOpen()
  620.    TimerStartOk = cTimerStart(TimerHandle)
  621.    
  622.    For i = 1 To Iteration
  623.       strResult = cGetInR(Str1, Sep1, 3)
  624.    Next i
  625.    
  626.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  627.    
  628.    TimerCloseOk = cTimerClose(TimerHandle)
  629.  
  630. End Sub
  631.  
  632. Private Sub TestGetInPart()
  633.    
  634.    Dim intResult        As Integer
  635.    Dim strResult        As String
  636.    Dim strDisplay       As String
  637.    
  638.    Dim i                As Integer
  639.    
  640.    Dim Str1             As String
  641.    Dim Sep1             As String
  642.    
  643.    intResult = 0
  644.    
  645.    strResult = ""
  646.    strDisplay = ""
  647.      
  648.    Str1 = Text1.Text
  649.    
  650.    Sep1 = "/"
  651.    
  652.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  653.  
  654.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  655.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  656.    
  657.    Sep1 = "G"
  658.    
  659.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  660.  
  661.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  662.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  663.    
  664.    Sep1 = "g"
  665.    
  666.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  667.  
  668.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  669.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'"
  670.    
  671.    txt_Result = strDisplay
  672.  
  673.    'time the function
  674.  
  675.    TimerHandle = cTimerOpen()
  676.    TimerStartOk = cTimerStart(TimerHandle)
  677.    
  678.    For i = 1 To Iteration
  679.       strResult = cGetInPart(Str1, Sep1, True)
  680.    Next i
  681.    
  682.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  683.    
  684.    TimerCloseOk = cTimerClose(TimerHandle)
  685.  
  686. End Sub
  687.  
  688. Private Sub TestGetInPartR()
  689.    
  690.    Dim intResult        As Integer
  691.    Dim strResult        As String
  692.    Dim strDisplay       As String
  693.    
  694.    Dim i                As Integer
  695.    
  696.    Dim Str1             As String
  697.    Dim Sep1             As String
  698.    
  699.    intResult = 0
  700.    
  701.    strResult = ""
  702.    strDisplay = ""
  703.      
  704.    Str1 = Text1.Text
  705.    
  706.    Sep1 = "/"
  707.    
  708.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  709.  
  710.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  711.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  712.    
  713.    Sep1 = "G"
  714.    
  715.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  716.  
  717.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  718.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  719.    
  720.    Sep1 = "g"
  721.    
  722.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  723.  
  724.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  725.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'"
  726.    
  727.    txt_Result = strDisplay
  728.  
  729.    'time the function
  730.  
  731.    TimerHandle = cTimerOpen()
  732.    TimerStartOk = cTimerStart(TimerHandle)
  733.    
  734.    For i = 1 To Iteration
  735.       strResult = cGetInPartR(Str1, Sep1, True)
  736.    Next i
  737.    
  738.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  739.    
  740.    TimerCloseOk = cTimerClose(TimerHandle)
  741.  
  742. End Sub
  743.  
  744. Private Sub TestGetBlock()
  745.    
  746.    Dim intResult        As Integer
  747.    Dim strResult        As String
  748.    Dim strDisplay       As String
  749.    
  750.    Dim i                As Integer
  751.    
  752.    Dim Str1             As String
  753.    Dim BlockSize        As Integer
  754.    
  755.    intResult = 0
  756.    
  757.    strResult = ""
  758.    strDisplay = ""
  759.      
  760.    Str1 = Text1.Text
  761.    
  762.    BlockSize = 2
  763.    
  764.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  765.  
  766.    strDisplay = strDisplay & "3: '" & cGetBlock(Str1, 3, BlockSize) & "'" & vbCrLf
  767.    strDisplay = strDisplay & "7: '" & cGetBlock(Str1, 7, BlockSize) & "'" & vbCrLf
  768.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf
  769.    strDisplay = strDisplay & "5: '" & cGetBlock(Str1, 5, BlockSize) & "'" & vbCrLf
  770.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf
  771.    strDisplay = strDisplay & "0: '" & cGetBlock(Str1, 0, BlockSize) & "'" & vbCrLf & vbCrLf
  772.    
  773.    BlockSize = 3
  774.    
  775.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  776.  
  777.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf
  778.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf & vbCrLf
  779.    
  780.    BlockSize = 4
  781.    
  782.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  783.  
  784.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf
  785.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'"
  786.    
  787.    txt_Result = strDisplay
  788.  
  789.    'time the function
  790.  
  791.    TimerHandle = cTimerOpen()
  792.    TimerStartOk = cTimerStart(TimerHandle)
  793.    
  794.    For i = 1 To Iteration
  795.       strResult = cGetBlock(Str1, BlockSize, 3)
  796.    Next i
  797.    
  798.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  799.    
  800.    TimerCloseOk = cTimerClose(TimerHandle)
  801.  
  802. End Sub
  803.  
  804. Private Sub TestInsertChars()
  805.    
  806.    Dim intResult        As Integer
  807.    Dim strResult        As String
  808.    Dim strDisplay       As String
  809.    
  810.    Dim i                As Integer
  811.    
  812.    Dim Str1             As String
  813.   
  814.    intResult = 0
  815.    
  816.    strResult = ""
  817.    strDisplay = ""
  818.      
  819.    Str1 = Text1.Text
  820.    
  821.    strDisplay = strDisplay & "Insert 'a' from 7 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  822.    strDisplay = strDisplay & cInsertChars(Str1, 7, "a") & vbCrLf & vbCrLf
  823.  
  824.    strDisplay = strDisplay & "Insert '10$' from 2 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  825.    strDisplay = strDisplay & cInsertChars(Str1, 2, "10$") & vbCrLf & vbCrLf
  826.  
  827.    strDisplay = strDisplay & "Insert '@' from 21 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  828.    strDisplay = strDisplay & cInsertChars(Str1, 21, "@") & vbCrLf & vbCrLf
  829.  
  830.    txt_Result = strDisplay
  831.  
  832.    'time the function
  833.  
  834.    TimerHandle = cTimerOpen()
  835.    TimerStartOk = cTimerStart(TimerHandle)
  836.    
  837.    For i = 1 To Iteration
  838.       strResult = cInsertChars(Str1, 1, "a")
  839.    Next i
  840.    
  841.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  842.    
  843.    TimerCloseOk = cTimerClose(TimerHandle)
  844.  
  845. End Sub
  846.  
  847. Private Sub TestInsertByMask()
  848.    
  849.    Dim intResult        As Integer
  850.    Dim strResult        As String
  851.    Dim strDisplay       As String
  852.    
  853.    Dim i                As Integer
  854.    
  855.    Dim Str1             As String
  856.    Dim Str2             As String
  857.    Dim Mask1            As String
  858.   
  859.    intResult = 0
  860.    
  861.    strResult = ""
  862.    strDisplay = ""
  863.      
  864.    Str1 = "Nr ## Price $###.##"
  865.    Str2 = "0705200"
  866.    Mask1 = "#"
  867.    
  868.    strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  869.    strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf
  870.  
  871.    Str1 = Text1.Text
  872.    Str2 = String(cCount(Str1, "/"), "*")
  873.    Mask1 = "/"
  874.    
  875.    strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  876.    strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf
  877.  
  878.    txt_Result = strDisplay
  879.  
  880.    'time the function
  881.  
  882.    TimerHandle = cTimerOpen()
  883.    TimerStartOk = cTimerStart(TimerHandle)
  884.    
  885.    For i = 1 To Iteration
  886.       strResult = cInsertByMask(Str1, Mask1, Str2)
  887.    Next i
  888.    
  889.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  890.    
  891.    TimerCloseOk = cTimerClose(TimerHandle)
  892.  
  893. End Sub
  894.  
  895. Private Sub TestInsertBlocks()
  896.    
  897.    Dim intResult        As Integer
  898.    Dim strResult        As String
  899.    Dim strDisplay       As String
  900.    
  901.    Dim i                As Integer
  902.    
  903.    Dim Str1             As String
  904.    Dim Str2             As String
  905.   
  906.    intResult = 0
  907.    
  908.    strResult = ""
  909.    strDisplay = ""
  910.      
  911.    Str1 = "A~BC~DEF~GHIJ~"
  912.    Str2 = "a~bc~def~ghij"
  913.    
  914.    strDisplay = strDisplay + "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  915.    strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf
  916.  
  917.    Str1 = "A~BC~DEF~GHIJ~"
  918.    Str2 = ""
  919.    
  920.    strDisplay = strDisplay + "Insert '' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  921.    strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf
  922.  
  923.    txt_Result = strDisplay
  924.  
  925.    'time the function
  926.  
  927.    TimerHandle = cTimerOpen()
  928.    TimerStartOk = cTimerStart(TimerHandle)
  929.    
  930.    For i = 1 To Iteration
  931.       strResult = cInsertBlocks(Str1, Str2)
  932.    Next i
  933.    
  934.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  935.    
  936.    TimerCloseOk = cTimerClose(TimerHandle)
  937.  
  938. End Sub
  939.  
  940. Public Sub TestInsertBlocksBy()
  941.    
  942.    Dim intResult        As Integer
  943.    Dim strResult        As String
  944.    Dim strDisplay       As String
  945.    
  946.    Dim i                As Integer
  947.    
  948.    Dim Str1             As String
  949.    Dim Str2             As String
  950.    Dim Sep1             As String
  951.   
  952.    intResult = 0
  953.    
  954.    strResult = ""
  955.    strDisplay = ""
  956.      
  957.    Str1 = Text1.Text
  958.    Str2 = "a/bc/def/ghij"
  959.    Sep1 = "/"
  960.    
  961.    strDisplay = strDisplay + "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  962.    strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf
  963.  
  964.    Str1 = Text1.Text
  965.    Str2 = ""
  966.    
  967.    strDisplay = strDisplay + "Insert '' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  968.    strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf
  969.  
  970.    txt_Result = strDisplay
  971.  
  972.    'time the function
  973.  
  974.    TimerHandle = cTimerOpen()
  975.    TimerStartOk = cTimerStart(TimerHandle)
  976.    
  977.    For i = 1 To Iteration
  978.       strResult = cInsertBlocksBy(Str1, Str2, Sep1)
  979.    Next i
  980.    
  981.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  982.    
  983.    TimerCloseOk = cTimerClose(TimerHandle)
  984.  
  985. End Sub
  986.  
  987. Private Sub TestRemoveOneChar()
  988.    
  989.    Dim intResult        As Integer
  990.    Dim strResult        As String
  991.    Dim strDisplay       As String
  992.    
  993.    Dim i                As Integer
  994.    
  995.    Dim Str1             As String
  996.    
  997.    intResult = 0
  998.    
  999.    strResult = ""
  1000.    strDisplay = ""
  1001.      
  1002.    Str1 = Text1.Text
  1003.    strDisplay = strDisplay & "Removing the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1004.    strDisplay = strDisplay & cRemoveOneChar(Str1, 7) & vbCrLf & vbCrLf
  1005.    
  1006.    Str1 = Text1.Text
  1007.    strDisplay = strDisplay & "Removing the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1008.    strDisplay = strDisplay & cRemoveOneChar(Str1, 21) & vbCrLf & vbCrLf
  1009.    
  1010.    Str1 = Text1.Text
  1011.    strDisplay = strDisplay & "Removing the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1012.    strDisplay = strDisplay & cRemoveOneChar(Str1, 14) & vbCrLf & vbCrLf
  1013.    
  1014.    Str1 = Text1.Text
  1015.    strDisplay = strDisplay & "Removing the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1016.    strDisplay = strDisplay & cRemoveOneChar(Str1, 0) & vbCrLf & vbCrLf
  1017.    
  1018.    Str1 = Text1.Text
  1019.    strDisplay = strDisplay & "Removing the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1020.    strDisplay = strDisplay & cRemoveOneChar(Str1, 1)
  1021.    
  1022.    txt_Result = strDisplay
  1023.  
  1024.    'time the function
  1025.  
  1026.    Str1 = Text1.Text
  1027.    
  1028.    TimerHandle = cTimerOpen()
  1029.    TimerStartOk = cTimerStart(TimerHandle)
  1030.    
  1031.    For i = 1 To Iteration
  1032.       strResult = cRemoveOneChar(Str1, 7)
  1033.    Next i
  1034.    
  1035.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1036.    
  1037.    TimerCloseOk = cTimerClose(TimerHandle)
  1038.  
  1039. End Sub
  1040.  
  1041. Public Sub TestRemoveBlockChar()
  1042.    
  1043.    Dim intResult        As Integer
  1044.    Dim strResult        As String
  1045.    Dim strDisplay       As String
  1046.    
  1047.    Dim i                As Integer
  1048.    
  1049.    Dim Str1             As String
  1050.    
  1051.    intResult = 0
  1052.    
  1053.    strResult = ""
  1054.    strDisplay = ""
  1055.      
  1056.    Str1 = Text1.Text
  1057.    strDisplay = strDisplay & "Removing 3 chars from the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1058.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 7, 3) & vbCrLf & vbCrLf
  1059.    
  1060.    Str1 = Text1.Text
  1061.    strDisplay = strDisplay & "Removing 2 chars from the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1062.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 21, 2) & vbCrLf & vbCrLf
  1063.    
  1064.    Str1 = Text1.Text
  1065.    strDisplay = strDisplay & "Removing 7 chars from the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1066.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 14, 7) & vbCrLf & vbCrLf
  1067.    
  1068.    Str1 = Text1.Text
  1069.    strDisplay = strDisplay & "Removing 14 chars from the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1070.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 0, 14) & vbCrLf & vbCrLf
  1071.    
  1072.    Str1 = Text1.Text
  1073.    strDisplay = strDisplay & "Removing 50 chars from the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1074.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 1, 50)
  1075.    
  1076.    txt_Result = strDisplay
  1077.  
  1078.    'time the function
  1079.  
  1080.    Str1 = Text1.Text
  1081.  
  1082.    TimerHandle = cTimerOpen()
  1083.    TimerStartOk = cTimerStart(TimerHandle)
  1084.    
  1085.    For i = 1 To Iteration
  1086.       strResult = cRemoveBlockChar(Str1, 1, 1)
  1087.    Next i
  1088.    
  1089.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1090.    
  1091.    TimerCloseOk = cTimerClose(TimerHandle)
  1092.  
  1093. End Sub
  1094.  
  1095. Private Sub TestTokenIn()
  1096.    
  1097.    Dim intResult        As Integer
  1098.    Dim strResult        As String
  1099.    Dim strDisplay       As String
  1100.    
  1101.    Dim i                As Integer
  1102.    
  1103.    Dim Str1             As String
  1104.    Dim Sep1             As String
  1105.    
  1106.    intResult = 0
  1107.    
  1108.    strResult = ""
  1109.    strDisplay = ""
  1110.      
  1111.    Str1 = Text1.Text
  1112.    
  1113.    Sep1 = "/HM"
  1114.    
  1115.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  1116.  
  1117.    strDisplay = strDisplay & "3: '" & cTokenIn(Str1, Sep1, 3) & "'" & vbCrLf
  1118.    strDisplay = strDisplay & "7: '" & cTokenIn(Str1, Sep1, 7) & "'" & vbCrLf
  1119.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf
  1120.    strDisplay = strDisplay & "5: '" & cTokenIn(Str1, Sep1, 5) & "'" & vbCrLf
  1121.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf
  1122.    strDisplay = strDisplay & "0: '" & cTokenIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  1123.    
  1124.    Sep1 = "G"
  1125.    
  1126.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  1127.  
  1128.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf
  1129.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  1130.    
  1131.    Sep1 = "g"
  1132.    
  1133.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  1134.  
  1135.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf
  1136.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'"
  1137.    
  1138.    txt_Result = strDisplay
  1139.  
  1140.    'time the function
  1141.  
  1142.    TimerHandle = cTimerOpen()
  1143.    TimerStartOk = cTimerStart(TimerHandle)
  1144.    
  1145.    For i = 1 To Iteration
  1146.       strResult = cTokenIn(Str1, Sep1, 3)
  1147.    Next i
  1148.    
  1149.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1150.    
  1151.    TimerCloseOk = cTimerClose(TimerHandle)
  1152.  
  1153. End Sub
  1154.  
  1155. Private Sub TestOrTokenX()
  1156.    
  1157.    Dim intResult        As Integer
  1158.    Dim strResult        As String
  1159.    Dim strDisplay       As String
  1160.    
  1161.    Dim i                As Integer
  1162.    
  1163.    Dim Str1             As String
  1164.    Dim Str2             As String
  1165.    Dim Sep1             As String
  1166.    
  1167.    intResult = 0
  1168.    
  1169.    strResult = ""
  1170.    strDisplay = ""
  1171.    
  1172.    Sep1 = "\"
  1173.      
  1174.    Str1 = "FOX|OVER|THE"
  1175.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1176.    strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  1177.    
  1178.    Str1 = "quick|jumps|the"
  1179.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1180.    strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  1181.  
  1182.    Str1 = "FOX\OVER\THE"
  1183.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1184.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1185.    
  1186.    Str1 = "quick\jumps\the"
  1187.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1188.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1189.  
  1190.    Str1 = "FOX/OVER/THE"
  1191.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1192.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1193.    
  1194.    Str1 = "quick\JUMPS\the"
  1195.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1196.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1197.  
  1198.    Str1 = LCase$("quick\jumps\THE")
  1199.    Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG")
  1200.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1201.    
  1202.    txt_Result = strDisplay
  1203.  
  1204.    'time the function
  1205.  
  1206.    TimerHandle = cTimerOpen()
  1207.    TimerStartOk = cTimerStart(TimerHandle)
  1208.    
  1209.    For i = 1 To Iteration
  1210.       strResult = cOrTokenIn(Str2, Str1, Sep1)
  1211.    Next i
  1212.    
  1213.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1214.    
  1215.    TimerCloseOk = cTimerClose(TimerHandle)
  1216.  
  1217. End Sub
  1218.  
  1219. Private Sub TestAndTokenX()
  1220.    
  1221.    Dim intResult        As Integer
  1222.    Dim strResult        As String
  1223.    Dim strDisplay       As String
  1224.    
  1225.    Dim i                As Integer
  1226.    
  1227.    Dim Str1             As String
  1228.    Dim Str2             As String
  1229.    Dim Sep1             As String
  1230.    
  1231.    intResult = 0
  1232.    
  1233.    strResult = ""
  1234.    strDisplay = ""
  1235.      
  1236.    Sep1 = "\"
  1237.      
  1238.    Str1 = "FOX|OVER|THE"
  1239.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1240.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  1241.    
  1242.    Str1 = "quick|jumps|the"
  1243.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1244.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  1245.  
  1246.    Str1 = "FOX\OVER\THE"
  1247.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1248.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1249.    
  1250.    Str1 = "quick\jumps\the"
  1251.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1252.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1253.  
  1254.    Str1 = "FOX/OVER/THE"
  1255.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1256.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1257.    
  1258.    Str1 = "quick\JUMPS\the"
  1259.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  1260.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1261.  
  1262.    Str1 = LCase$("quick\jumps\THE")
  1263.    Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG")
  1264.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  1265.    
  1266.    txt_Result = strDisplay
  1267.  
  1268.    'time the function
  1269.  
  1270.    TimerHandle = cTimerOpen()
  1271.    TimerStartOk = cTimerStart(TimerHandle)
  1272.    
  1273.    For i = 1 To Iteration
  1274.       strResult = cOrTokenIn(Str2, Str1, Sep1)
  1275.    Next i
  1276.    
  1277.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1278.    
  1279.    TimerCloseOk = cTimerClose(TimerHandle)
  1280.  
  1281. End Sub
  1282.  
  1283. Private Sub TestReverse()
  1284.    
  1285.    Dim intResult        As Integer
  1286.    Dim strResult        As String
  1287.    Dim strDisplay       As String
  1288.    
  1289.    Dim i                As Integer
  1290.    
  1291.    Dim Str1             As String
  1292.    Dim Str2             As String
  1293.    
  1294.    intResult = 0
  1295.    
  1296.    strResult = ""
  1297.    strDisplay = ""
  1298.      
  1299.    Str1 = Text1.Text
  1300.    Str2 = cReverse(Str1)
  1301.    
  1302.    strDisplay = strDisplay & "Reverse of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1303.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1304.    
  1305.    strDisplay = strDisplay & "Reverse of '" & Str2 & "' is " & vbCrLf & vbCrLf
  1306.    strDisplay = strDisplay & cReverse(Str2) & vbCrLf & vbCrLf
  1307.    
  1308.    txt_Result = strDisplay
  1309.  
  1310.    'time the function
  1311.  
  1312.    TimerHandle = cTimerOpen()
  1313.    TimerStartOk = cTimerStart(TimerHandle)
  1314.    
  1315.    For i = 1 To Iteration
  1316.       strResult = cReverse(Str1)
  1317.    Next i
  1318.    
  1319.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1320.    
  1321.    TimerCloseOk = cTimerClose(TimerHandle)
  1322.  
  1323. End Sub
  1324.  
  1325. Private Sub TestMixChars()
  1326.    
  1327.    Dim intResult        As Integer
  1328.    Dim strResult        As String
  1329.    Dim strDisplay       As String
  1330.    
  1331.    Dim i                As Integer
  1332.    
  1333.    Dim Str1             As String
  1334.    Dim Str2             As String
  1335.    
  1336.    intResult = 0
  1337.    
  1338.    strResult = ""
  1339.    strDisplay = ""
  1340.      
  1341.    Str1 = Text1.Text
  1342.    Str2 = cMixChars(Str1)
  1343.    
  1344.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1345.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1346.    
  1347.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  1348.    strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf
  1349.    
  1350.    Str1 = "TIME TO WIN (32-Bit)"
  1351.    Str2 = cMixChars(Str1)
  1352.    
  1353.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1354.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1355.    
  1356.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  1357.    strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf
  1358.    
  1359.    Str1 = "Under the sky, the sun lights"
  1360.    Str2 = cMixChars(Str1)
  1361.    
  1362.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1363.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1364.    
  1365.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  1366.    strDisplay = strDisplay & cMixChars(Str2)
  1367.    
  1368.    txt_Result = strDisplay
  1369.  
  1370.    'time the function
  1371.  
  1372.    TimerHandle = cTimerOpen()
  1373.    TimerStartOk = cTimerStart(TimerHandle)
  1374.    
  1375.    For i = 1 To Iteration
  1376.       strResult = cMixChars(Str1)
  1377.    Next i
  1378.    
  1379.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1380.    
  1381.    TimerCloseOk = cTimerClose(TimerHandle)
  1382.  
  1383. End Sub
  1384.  
  1385. Private Sub TestScrollX()
  1386.    
  1387.    Dim intResult        As Integer
  1388.    Dim strResult        As String
  1389.    Dim strDisplay       As String
  1390.    
  1391.    Dim i                As Integer
  1392.    
  1393.    Dim Str1             As String
  1394.    Dim Str2             As String
  1395.    
  1396.    intResult = 0
  1397.    
  1398.    strResult = ""
  1399.    strDisplay = ""
  1400.      
  1401.    Str1 = Text1.Text
  1402.    Str2 = Text1.Text
  1403.    
  1404.    strDisplay = strDisplay & "Scroll 7 times from left into '" & Str1 & "' is " & vbCrLf & vbCrLf
  1405.    
  1406.    For i = 1 To 7
  1407.       Str2 = cScrollL(Str2)
  1408.       strDisplay = strDisplay & Str2 & vbCrLf
  1409.    Next i
  1410.    
  1411.    strDisplay = strDisplay & vbCrLf
  1412.    
  1413.    Str1 = Text1.Text
  1414.    Str2 = Text1.Text
  1415.    
  1416.    strDisplay = strDisplay & "Scroll 7 times from right into '" & Str1 & "' is " & vbCrLf & vbCrLf
  1417.    
  1418.    For i = 1 To 7
  1419.       Str2 = cScrollR(Str2)
  1420.       strDisplay = strDisplay & Str2 & vbCrLf
  1421.    Next i
  1422.    
  1423.    strDisplay = strDisplay & vbCrLf
  1424.    
  1425.    txt_Result = strDisplay
  1426.  
  1427.    'time the function
  1428.  
  1429.    TimerHandle = cTimerOpen()
  1430.    TimerStartOk = cTimerStart(TimerHandle)
  1431.    
  1432.    For i = 1 To Iteration
  1433.       strResult = cScrollL(Str1)
  1434.    Next i
  1435.    
  1436.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1437.    
  1438.    TimerCloseOk = cTimerClose(TimerHandle)
  1439.  
  1440. End Sub
  1441.  
  1442. Private Sub TestChangeChars()
  1443.    
  1444.    Dim intResult        As Integer
  1445.    Dim strResult        As String
  1446.    Dim strDisplay       As String
  1447.    
  1448.    Dim i                As Integer
  1449.    
  1450.    Dim Str1             As String
  1451.    
  1452.    intResult = 0
  1453.    
  1454.    strResult = ""
  1455.    strDisplay = ""
  1456.      
  1457.    Str1 = Text1.Text
  1458.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1459.    Call cChangeChars(Str1, "AZM", "qyc")
  1460.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1461.  
  1462.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1463.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1464.    Call cChangeChars(Str1, "AZM", "qyc")
  1465.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1466.  
  1467.    strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1468.    Call cChangeChars(Str1, "qyc", "+-*")
  1469.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1470.  
  1471.    txt_Result = strDisplay
  1472.  
  1473.    'time the function
  1474.  
  1475.    Str1 = Text1.Text
  1476.    
  1477.    TimerHandle = cTimerOpen()
  1478.    TimerStartOk = cTimerStart(TimerHandle)
  1479.    
  1480.    For i = 1 To Iteration
  1481.       Call cChangeChars(Str1, "AZM", "qyc")
  1482.    Next i
  1483.    
  1484.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1485.    
  1486.    TimerCloseOk = cTimerClose(TimerHandle)
  1487.  
  1488. End Sub
  1489.  
  1490. Private Sub TestChangeCharsUntil()
  1491.    
  1492.    Dim intResult        As Integer
  1493.    Dim strResult        As String
  1494.    Dim strDisplay       As String
  1495.    
  1496.    Dim i                As Integer
  1497.    
  1498.    Dim Str1             As String
  1499.    
  1500.    intResult = 0
  1501.    
  1502.    strResult = ""
  1503.    strDisplay = ""
  1504.      
  1505.    Str1 = Text1.Text
  1506.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1507.    Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1508.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1509.  
  1510.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1511.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1512.    Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1513.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1514.  
  1515.    strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1516.    Call cChangeCharsUntil(Str1, "qyc", "+-*", "N")
  1517.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1518.  
  1519.    txt_Result = strDisplay
  1520.  
  1521.    'time the function
  1522.  
  1523.    Str1 = Text1.Text
  1524.    
  1525.    TimerHandle = cTimerOpen()
  1526.    TimerStartOk = cTimerStart(TimerHandle)
  1527.    
  1528.    For i = 1 To Iteration
  1529.       Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1530.    Next i
  1531.    
  1532.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1533.    
  1534.    TimerCloseOk = cTimerClose(TimerHandle)
  1535.  
  1536. End Sub
  1537.  
  1538. Private Sub TestCheckChars()
  1539.    
  1540.    Dim intResult        As Integer
  1541.    Dim strResult        As String
  1542.    Dim strDisplay       As String
  1543.    
  1544.    Dim i                As Integer
  1545.    
  1546.    Dim Str1             As String
  1547.    
  1548.    intResult = 0
  1549.    
  1550.    strResult = ""
  1551.    strDisplay = ""
  1552.      
  1553.    Str1 = Text1.Text
  1554.    strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1555.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1556.    strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1557.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1558.  
  1559.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1560.    strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1561.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1562.    strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1563.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present")
  1564.    
  1565.    txt_Result = strDisplay
  1566.  
  1567.    'time the function
  1568.  
  1569.    Str1 = Text1.Text
  1570.    
  1571.    TimerHandle = cTimerOpen()
  1572.    TimerStartOk = cTimerStart(TimerHandle)
  1573.    
  1574.    For i = 1 To Iteration
  1575.       intResult = cCheckChars(Str1, "aZ")
  1576.    Next i
  1577.    
  1578.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1579.    
  1580.    TimerCloseOk = cTimerClose(TimerHandle)
  1581.  
  1582. End Sub
  1583.  
  1584. Private Sub TestFilterChars()
  1585.    
  1586.    Dim intResult        As Integer
  1587.    Dim strResult        As String
  1588.    Dim strDisplay       As String
  1589.    
  1590.    Dim i                As Integer
  1591.    
  1592.    Dim Str1             As String
  1593.    
  1594.    intResult = 0
  1595.    
  1596.    strResult = ""
  1597.    strDisplay = ""
  1598.      
  1599.    Str1 = Text1.Text
  1600.    strDisplay = strDisplay & "Filter 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1601.    strDisplay = strDisplay & cFilterChars(Str1, "B/") & vbCrLf & vbCrLf
  1602.  
  1603.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1604.    strDisplay = strDisplay & "Filter 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1605.    strDisplay = strDisplay & cFilterChars(Str1, "BY")
  1606.    
  1607.    txt_Result = strDisplay
  1608.  
  1609.    'time the function
  1610.  
  1611.    Str1 = Text1.Text
  1612.    
  1613.    TimerHandle = cTimerOpen()
  1614.    TimerStartOk = cTimerStart(TimerHandle)
  1615.    
  1616.    For i = 1 To Iteration
  1617.       strResult = cFilterChars(Str1, "B/")
  1618.    Next i
  1619.    
  1620.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1621.    
  1622.    TimerCloseOk = cTimerClose(TimerHandle)
  1623.  
  1624. End Sub
  1625.  
  1626. Private Sub TestFilterNotChars()
  1627.    
  1628.    Dim intResult        As Integer
  1629.    Dim strResult        As String
  1630.    Dim strDisplay       As String
  1631.    
  1632.    Dim i                As Integer
  1633.    
  1634.    Dim Str1             As String
  1635.    
  1636.    intResult = 0
  1637.    
  1638.    strResult = ""
  1639.    strDisplay = ""
  1640.      
  1641.    Str1 = Text1.Text
  1642.    strDisplay = strDisplay & "Filter not 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1643.    strDisplay = strDisplay & cFilterNotChars(Str1, "B/") & vbCrLf & vbCrLf
  1644.  
  1645.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1646.    strDisplay = strDisplay & "Filter not 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1647.    strDisplay = strDisplay & cFilterNotChars(Str1, "BY")
  1648.    
  1649.    txt_Result = strDisplay
  1650.  
  1651.    'time the function
  1652.  
  1653.    Str1 = Text1.Text
  1654.    
  1655.    TimerHandle = cTimerOpen()
  1656.    TimerStartOk = cTimerStart(TimerHandle)
  1657.    
  1658.    For i = 1 To Iteration
  1659.       strResult = cFilterNotChars(Str1, "B/")
  1660.    Next i
  1661.    
  1662.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1663.    
  1664.    TimerCloseOk = cTimerClose(TimerHandle)
  1665.  
  1666. End Sub
  1667.  
  1668. Private Sub TestFilterBlocks()
  1669.    
  1670.    Dim intResult        As Integer
  1671.    Dim strResult        As String
  1672.    Dim strDisplay       As String
  1673.    
  1674.    Dim i                As Integer
  1675.    
  1676.    Dim Str1             As String
  1677.    
  1678.    intResult = 0
  1679.    
  1680.    strResult = ""
  1681.    strDisplay = ""
  1682.      
  1683.    Str1 = Text1.Text
  1684.    
  1685.    strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1686.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf
  1687.  
  1688.    strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1689.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'" & vbCrLf & vbCrLf
  1690.  
  1691.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1692.    
  1693.    strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1694.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf
  1695.  
  1696.    strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1697.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'"
  1698.    
  1699.    txt_Result = strDisplay
  1700.  
  1701.    'time the function
  1702.  
  1703.    Str1 = Text1.Text
  1704.    
  1705.    TimerHandle = cTimerOpen()
  1706.    TimerStartOk = cTimerStart(TimerHandle)
  1707.    
  1708.    For i = 1 To Iteration
  1709.       strResult = cFilterBlocks(Str1, "BI")
  1710.    Next i
  1711.    
  1712.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1713.    
  1714.    TimerCloseOk = cTimerClose(TimerHandle)
  1715.  
  1716. End Sub
  1717.  
  1718. Private Sub TestResizeString()
  1719.    
  1720.    Dim intResult        As Integer
  1721.    Dim strResult        As String
  1722.    Dim strDisplay       As String
  1723.    
  1724.    Dim i                As Integer
  1725.    
  1726.    Dim Str1             As String
  1727.    
  1728.    intResult = 0
  1729.    
  1730.    strResult = ""
  1731.    strDisplay = ""
  1732.      
  1733.    Str1 = Text1.Text
  1734.    
  1735.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1736.    strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf
  1737.    
  1738.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1739.    strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf
  1740.  
  1741.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1742.    strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf
  1743.  
  1744.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1745.    strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'" & vbCrLf & vbCrLf
  1746.  
  1747.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1748.    
  1749.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1750.    strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf
  1751.    
  1752.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1753.    strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf
  1754.    
  1755.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1756.    strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf
  1757.  
  1758.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1759.    strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'"
  1760.  
  1761.    txt_Result = strDisplay
  1762.  
  1763.    'time the function
  1764.  
  1765.    Str1 = Text1.Text
  1766.    
  1767.    TimerHandle = cTimerOpen()
  1768.    TimerStartOk = cTimerStart(TimerHandle)
  1769.    
  1770.    For i = 1 To Iteration
  1771.       strResult = cResizeString(Str1, 5)
  1772.    Next i
  1773.    
  1774.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1775.    
  1776.    TimerCloseOk = cTimerClose(TimerHandle)
  1777.  
  1778. End Sub
  1779.  
  1780. Private Sub TestResizeStringAndFill()
  1781.    
  1782.    Dim intResult        As Integer
  1783.    Dim strResult        As String
  1784.    Dim strDisplay       As String
  1785.    
  1786.    Dim i                As Integer
  1787.    
  1788.    Dim Str1             As String
  1789.    
  1790.    intResult = 0
  1791.    
  1792.    strResult = ""
  1793.    strDisplay = ""
  1794.      
  1795.    Str1 = Text1.Text
  1796.    
  1797.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1798.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf
  1799.    
  1800.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1801.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf
  1802.  
  1803.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1804.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf
  1805.  
  1806.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1807.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'" & vbCrLf & vbCrLf
  1808.  
  1809.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1810.    
  1811.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1812.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf
  1813.    
  1814.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1815.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf
  1816.    
  1817.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1818.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf
  1819.  
  1820.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1821.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'"
  1822.  
  1823.    txt_Result = strDisplay
  1824.  
  1825.    'time the function
  1826.  
  1827.    Str1 = Text1.Text
  1828.    
  1829.    TimerHandle = cTimerOpen()
  1830.    TimerStartOk = cTimerStart(TimerHandle)
  1831.    
  1832.    For i = 1 To Iteration
  1833.       strResult = cResizeStringAndFill(Str1, 50, "*")
  1834.    Next i
  1835.    
  1836.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1837.    
  1838.    TimerCloseOk = cTimerClose(TimerHandle)
  1839.  
  1840. End Sub
  1841.  
  1842. Private Sub TestCreateAndFill()
  1843.    
  1844.    Dim intResult        As Integer
  1845.    Dim strResult        As String
  1846.    Dim strDisplay       As String
  1847.    
  1848.    Dim i                As Integer
  1849.    
  1850.    Dim Str1             As String
  1851.    
  1852.    intResult = 0
  1853.    
  1854.    strResult = ""
  1855.    strDisplay = ""
  1856.      
  1857.    Str1 = Text1.Text
  1858.    
  1859.    strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1860.    strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf
  1861.    
  1862.    strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1863.    strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'" & vbCrLf & vbCrLf
  1864.    
  1865.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1866.    
  1867.    strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1868.    strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf
  1869.    
  1870.    strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1871.    strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'"
  1872.  
  1873.    txt_Result = strDisplay
  1874.  
  1875.    'time the function
  1876.  
  1877.    Str1 = Text1.Text
  1878.    
  1879.    TimerHandle = cTimerOpen()
  1880.    TimerStartOk = cTimerStart(TimerHandle)
  1881.    
  1882.    For i = 1 To Iteration
  1883.       strResult = cCreateAndFill(40, Str1)
  1884.    Next i
  1885.    
  1886.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1887.    
  1888.    TimerCloseOk = cTimerClose(TimerHandle)
  1889.  
  1890. End Sub
  1891.  
  1892. Private Sub TestFill()
  1893.    
  1894.    Dim intResult        As Integer
  1895.    Dim strResult        As String
  1896.    Dim strDisplay       As String
  1897.    
  1898.    Dim i                As Integer
  1899.    
  1900.    Dim Str1             As String
  1901.    
  1902.    intResult = 0
  1903.    
  1904.    strResult = ""
  1905.    strDisplay = ""
  1906.      
  1907.    Str1 = Text1.Text
  1908.    
  1909.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '*=' is " & vbCrLf & vbCrLf
  1910.    Call cFill(Str1, "*=")
  1911.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1912.    
  1913.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '=*=' is " & vbCrLf & vbCrLf
  1914.    Call cFill(Str1, "=*=")
  1915.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1916.    
  1917.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1918.    
  1919.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '7516' is " & vbCrLf & vbCrLf
  1920.    Call cFill(Str1, "7516")
  1921.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1922.    
  1923.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '$61.00' is " & vbCrLf & vbCrLf
  1924.    Call cFill(Str1, "$61.00")
  1925.    strDisplay = strDisplay & "'" & Str1 & "'"
  1926.    
  1927.    txt_Result = strDisplay
  1928.  
  1929.    'time the function
  1930.  
  1931.    Str1 = Text1.Text
  1932.    
  1933.    TimerHandle = cTimerOpen()
  1934.    TimerStartOk = cTimerStart(TimerHandle)
  1935.    
  1936.    For i = 1 To Iteration
  1937.       Call cFill(Str1, "*=")
  1938.    Next i
  1939.    
  1940.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1941.    
  1942.    TimerCloseOk = cTimerClose(TimerHandle)
  1943.  
  1944. End Sub
  1945.  
  1946. Private Sub TestLrc()
  1947.    
  1948.    Dim intResult        As Integer
  1949.    Dim strResult        As String
  1950.    Dim strDisplay       As String
  1951.    
  1952.    Dim i                As Integer
  1953.    
  1954.    Dim Str1             As String
  1955.    
  1956.    intResult = 0
  1957.    
  1958.    strResult = ""
  1959.    strDisplay = ""
  1960.      
  1961.    Str1 = Text1.Text
  1962.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf
  1963.    
  1964.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1965.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf
  1966.    
  1967.    Str1 = Chr$(2) & "0a12721536"
  1968.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'"
  1969.    
  1970.    txt_Result = strDisplay
  1971.  
  1972.    'time the function
  1973.  
  1974.    Str1 = Text1.Text
  1975.    
  1976.    TimerHandle = cTimerOpen()
  1977.    TimerStartOk = cTimerStart(TimerHandle)
  1978.    
  1979.    For i = 1 To Iteration
  1980.       strResult = cLrc(Str1)
  1981.    Next i
  1982.    
  1983.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1984.    
  1985.    TimerCloseOk = cTimerClose(TimerHandle)
  1986.  
  1987. End Sub
  1988.  
  1989. Private Sub TestCompress()
  1990.    
  1991.    Dim intResult        As Integer
  1992.    Dim strResult        As String
  1993.    Dim strDisplay       As String
  1994.    
  1995.    Dim i                As Integer
  1996.    
  1997.    Dim Str1             As String
  1998.    
  1999.    intResult = 0
  2000.    
  2001.    strResult = ""
  2002.    strDisplay = ""
  2003.      
  2004.    Str1 = Text1.Text
  2005.    
  2006.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  2007.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  2008.  
  2009.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  2010.    
  2011.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  2012.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  2013.    
  2014.    Str1 = "A " & Chr$(9) & "BC  "
  2015.    
  2016.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  2017.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  2018.    
  2019.    txt_Result = strDisplay
  2020.  
  2021.    'time the function
  2022.  
  2023.    Str1 = Text1.Text
  2024.    
  2025.    TimerHandle = cTimerOpen()
  2026.    TimerStartOk = cTimerStart(TimerHandle)
  2027.    
  2028.    For i = 1 To Iteration
  2029.       strResult = cCompress(Str1)
  2030.    Next i
  2031.    
  2032.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2033.    
  2034.    TimerCloseOk = cTimerClose(TimerHandle)
  2035.  
  2036. End Sub
  2037.  
  2038. Public Sub TestCompressTab()
  2039.    
  2040.    Dim intResult        As Integer
  2041.    Dim strResult        As String
  2042.    Dim strDisplay       As String
  2043.    
  2044.    Dim i                As Integer
  2045.    
  2046.    Dim Str1             As String
  2047.    Dim Str2             As String
  2048.    Dim Str3             As String
  2049.    
  2050.    intResult = 0
  2051.    
  2052.    strResult = ""
  2053.    strDisplay = ""
  2054.      
  2055.    Str1 = "A      BC   DEF  GHIJ  "
  2056.    
  2057.    For i = 1 To 6
  2058.       Str2 = cCompressTab(Str1, i)
  2059.       Str3 = Str2
  2060.       Call cChangeChars(Str3, vbTab, "ª")
  2061.       strDisplay = strDisplay & "Compress tab (" & i & " chars) into '" & Str1 & "' is '" & Str3 & "'" & vbCrLf
  2062.       strDisplay = strDisplay & "Expand tab (" & i & " chars) into '" & Str3 & "' is '" & cExpandTab(Str2, i) & "'" & vbCrLf & vbCrLf
  2063.    Next i
  2064.  
  2065.    txt_Result = strDisplay
  2066.  
  2067.    'time the function
  2068.  
  2069.    Str1 = Text1.Text
  2070.    
  2071.    TimerHandle = cTimerOpen()
  2072.    TimerStartOk = cTimerStart(TimerHandle)
  2073.    
  2074.    For i = 1 To Iteration
  2075.       strResult = cCompressTab(Str1, 3)
  2076.    Next i
  2077.    
  2078.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2079.    
  2080.    TimerCloseOk = cTimerClose(TimerHandle)
  2081.  
  2082. End Sub
  2083.  
  2084. Private Sub TestCompact()
  2085.    
  2086.    Dim intResult        As Integer
  2087.    Dim strResult        As String
  2088.    Dim strDisplay       As String
  2089.    
  2090.    Dim i                As Integer
  2091.    
  2092.    Dim Str1             As String
  2093.    Dim Str2             As String
  2094.    
  2095.    intResult = 0
  2096.    
  2097.    strResult = ""
  2098.    strDisplay = ""
  2099.      
  2100.    Str1 = "987654321"
  2101.    Str2 = cCompact(Str1)
  2102.    
  2103.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  2104.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  2105.  
  2106.    Str1 = "1234567890"
  2107.    Str2 = cCompact(Str1)
  2108.    
  2109.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  2110.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  2111.  
  2112.    Str1 = Text1.Text
  2113.    Str2 = cCompact(Str1)
  2114.    
  2115.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  2116.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  2117.  
  2118.    txt_Result = strDisplay
  2119.  
  2120.    'time the function
  2121.  
  2122.    Str1 = Text1.Text
  2123.    
  2124.    TimerHandle = cTimerOpen()
  2125.    TimerStartOk = cTimerStart(TimerHandle)
  2126.    
  2127.    For i = 1 To Iteration
  2128.       strResult = cCompact(Str1)
  2129.    Next i
  2130.    
  2131.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2132.    
  2133.    TimerCloseOk = cTimerClose(TimerHandle)
  2134.  
  2135. End Sub
  2136.  
  2137. Private Sub TestAlign()
  2138.    
  2139.    Dim intResult        As Integer
  2140.    Dim strResult        As String
  2141.    Dim strDisplay       As String
  2142.    
  2143.    Dim i                As Integer
  2144.    
  2145.    Dim Str1             As String
  2146.    Dim Str2             As String
  2147.    
  2148.    intResult = 0
  2149.    
  2150.    strResult = ""
  2151.    strDisplay = ""
  2152.      
  2153.    Str1 = "T2WIN-32"
  2154.    
  2155.    strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2156.    strDisplay = strDisplay & "'" & cAlign(Str1, -1, 30) & "'" & vbCrLf & vbCrLf
  2157.    
  2158.    strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2159.    strDisplay = strDisplay & "'" & cAlign(Str1, 0, 30) & "'" & vbCrLf & vbCrLf
  2160.    
  2161.    strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2162.    strDisplay = strDisplay & "'" & cAlign(Str1, 1, 30) & "'" & vbCrLf & vbCrLf
  2163.    
  2164.    Str1 = Text1.Text
  2165.    
  2166.    strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2167.    strDisplay = strDisplay & "'" & cAlign(Str1, -1, 50) & "'" & vbCrLf & vbCrLf
  2168.    
  2169.    strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2170.    strDisplay = strDisplay & "'" & cAlign(Str1, 0, 50) & "'" & vbCrLf & vbCrLf
  2171.    
  2172.    strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  2173.    strDisplay = strDisplay & "'" & cAlign(Str1, 1, 50) & "'"
  2174.    
  2175.    txt_Result = strDisplay
  2176.  
  2177.    'time the function
  2178.  
  2179.    Str1 = Text1.Text
  2180.    
  2181.    TimerHandle = cTimerOpen()
  2182.    TimerStartOk = cTimerStart(TimerHandle)
  2183.    
  2184.    For i = 1 To Iteration
  2185.       strResult = cAlign(Str1, 1, 30)
  2186.    Next i
  2187.    
  2188.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2189.    
  2190.    TimerCloseOk = cTimerClose(TimerHandle)
  2191.  
  2192. End Sub
  2193.  
  2194. Private Sub TestProperName()
  2195.    
  2196.    Dim intResult        As Integer
  2197.    Dim strResult        As String
  2198.    Dim strDisplay       As String
  2199.    
  2200.    Dim i                As Integer
  2201.    
  2202.    Dim Str1             As String
  2203.    Dim Str2             As String
  2204.    
  2205.    intResult = 0
  2206.    
  2207.    strResult = ""
  2208.    strDisplay = ""
  2209.      
  2210.    Str1 = Text1.Text
  2211.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  2212.    Str1 = "John fitz,jr"
  2213.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  2214.    Str1 = "john Fitz, jr"
  2215.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  2216.    Str1 = "macdonald"
  2217.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  2218.    Str1 = "mac donald"
  2219.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1)
  2220.                   
  2221.    txt_Result = strDisplay
  2222.  
  2223.    'time the function
  2224.  
  2225.    Str1 = Text1.Text
  2226.    
  2227.    TimerHandle = cTimerOpen()
  2228.    TimerStartOk = cTimerStart(TimerHandle)
  2229.    
  2230.    For i = 1 To Iteration
  2231.       strResult = cProperName(Str1)
  2232.    Next i
  2233.    
  2234.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2235.    
  2236.    TimerCloseOk = cTimerClose(TimerHandle)
  2237.  
  2238. End Sub
  2239.  
  2240. Private Sub TestProperName2()
  2241.    
  2242.    Dim intResult        As Integer
  2243.    Dim strResult        As String
  2244.    Dim strDisplay       As String
  2245.    
  2246.    Dim i                As Integer
  2247.    
  2248.    Dim Str1             As String
  2249.    Dim Str2             As String
  2250.    
  2251.    intResult = 0
  2252.    
  2253.    strResult = ""
  2254.    strDisplay = ""
  2255.      
  2256.    Str1 = Text1.Text
  2257.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  2258.    Str1 = "JOHN FITZ,JR"
  2259.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_UPPERCASE Or PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  2260.    Str1 = "john Fitz,jr"
  2261.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  2262.    Str1 = "macdonald"
  2263.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  2264.    Str1 = "mac donald"
  2265.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  2266.    Str1 = "a.l. greene jr."
  2267.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  2268.    Str1 = "shale and sandstone and till"
  2269.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  2270.    Str1 = "a sandstone or a shale"
  2271.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/or/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  2272.    Str1 = "RR2 BARRHEAD"
  2273.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "rr2", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL) & "'" & vbCrLf & vbCrLf
  2274.    Str1 = "ANDY MACDONALD"
  2275.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "mac", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL Or PN_ONLY_LEADER_SPACE) & "'"
  2276.                   
  2277.    txt_Result = strDisplay
  2278.  
  2279.    'time the function
  2280.  
  2281.    Str1 = Text1.Text
  2282.    
  2283.    TimerHandle = cTimerOpen()
  2284.    TimerStartOk = cTimerStart(TimerHandle)
  2285.    
  2286.    For i = 1 To Iteration
  2287.       strResult = cProperName2(Str1, "", 0)
  2288.    Next i
  2289.    
  2290.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2291.    
  2292.    TimerCloseOk = cTimerClose(TimerHandle)
  2293.  
  2294. End Sub
  2295.  
  2296. Private Sub TestStringSAR()
  2297.    
  2298.    Dim intResult        As Integer
  2299.    Dim strResult        As String
  2300.    Dim strDisplay       As String
  2301.    
  2302.    Dim i                As Integer
  2303.    
  2304.    Dim Str1             As String
  2305.    Dim Str2             As String
  2306.    
  2307.    intResult = 0
  2308.    
  2309.    strResult = ""
  2310.    strDisplay = ""
  2311.      
  2312.    Str1 = "T2WIN-32, T2WIN-32, T2WIN-32, T2WIN-32 IS A DLL"
  2313.    Str2 = cStringSAR(Str1, "T2WIN-32", "t2win-32", False)
  2314.    
  2315.    strDisplay = strDisplay & "Replace 'T2WIN-32' by 't2win-32'" & vbCrLf
  2316.    strDisplay = strDisplay & "     in" & vbCrLf
  2317.    strDisplay = strDisplay & Str1 & vbCrLf
  2318.    strDisplay = strDisplay & "     is" & vbCrLf
  2319.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  2320.  
  2321.    Str2 = cStringSAR(Str1, "2W", "IME TO W", True)
  2322.  
  2323.    strDisplay = strDisplay & "Replace '2W' by 'IME TO W'" & vbCrLf
  2324.    strDisplay = strDisplay & "     in" & vbCrLf
  2325.    strDisplay = strDisplay & Str1 & vbCrLf
  2326.    strDisplay = strDisplay & "     is" & vbCrLf
  2327.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  2328.  
  2329.    Str2 = cStringSAR(Str1, "T2WIN-32", "", True)
  2330.  
  2331.    strDisplay = strDisplay & "Replace 'T2WIN-32, ' by ''" & vbCrLf
  2332.    strDisplay = strDisplay & "     in" & vbCrLf
  2333.    strDisplay = strDisplay & Str1 & vbCrLf
  2334.    strDisplay = strDisplay & "     is" & vbCrLf
  2335.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  2336.  
  2337.    Str2 = cStringSAR(Str1, "I", "i", False)
  2338.  
  2339.    strDisplay = strDisplay & "Replace 'I' by 'i'" & vbCrLf
  2340.    strDisplay = strDisplay & "     in" & vbCrLf
  2341.    strDisplay = strDisplay & Str1 & vbCrLf
  2342.    strDisplay = strDisplay & "     is" & vbCrLf
  2343.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  2344.  
  2345.    txt_Result = strDisplay
  2346.  
  2347.    'time the function
  2348.  
  2349.    Str1 = Text1.Text
  2350.    
  2351.    TimerHandle = cTimerOpen()
  2352.    TimerStartOk = cTimerStart(TimerHandle)
  2353.    
  2354.    For i = 1 To Iteration
  2355.       strResult = cStringSAR(Str1, "T2WIN-32", "t2win-32", False)
  2356.    Next i
  2357.    
  2358.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2359.    
  2360.    TimerCloseOk = cTimerClose(TimerHandle)
  2361.  
  2362. End Sub
  2363.  
  2364. Private Sub TestToHexa()
  2365.    
  2366.    Dim intResult        As Integer
  2367.    Dim strResult        As String
  2368.    Dim strDisplay       As String
  2369.    
  2370.    Dim i                As Integer
  2371.    
  2372.    Dim Str1             As String
  2373.    Dim Str2             As String
  2374.    
  2375.    intResult = 0
  2376.    
  2377.    strResult = ""
  2378.    strDisplay = ""
  2379.    
  2380.    Str1 = Text1.Text
  2381.    Str2 = cToHexa(Str1)
  2382.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2383.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2384.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2385.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf
  2386.  
  2387.    Str1 = "ABCDEFGH"
  2388.    Str2 = cToHexa(Str1)
  2389.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2390.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2391.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2392.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf
  2393.  
  2394.    Str1 = "01234567890"
  2395.    Str2 = cToHexa(Str1)
  2396.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2397.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2398.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2399.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'"
  2400.  
  2401.    txt_Result = strDisplay
  2402.  
  2403.    'time the function
  2404.  
  2405.    Str1 = Text1.Text
  2406.    
  2407.    TimerHandle = cTimerOpen()
  2408.    TimerStartOk = cTimerStart(TimerHandle)
  2409.    
  2410.    For i = 1 To Iteration
  2411.       strResult = cToHexa(Str1)
  2412.    Next i
  2413.    
  2414.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2415.    
  2416.    TimerCloseOk = cTimerClose(TimerHandle)
  2417.  
  2418. End Sub
  2419.  
  2420. Private Sub TestRomanArabic()
  2421.    
  2422.    Dim intResult        As Integer
  2423.    Dim strResult        As String
  2424.    Dim strDisplay       As String
  2425.    
  2426.    Dim i                As Integer
  2427.    
  2428.    Dim Str1             As String
  2429.    Dim Value            As Integer
  2430.    
  2431.    intResult = 0
  2432.    
  2433.    strResult = ""
  2434.    strDisplay = ""
  2435.    
  2436.    Str1 = UCase$(cArabicToRoman(Year(Int(Now))))
  2437.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  2438.    
  2439.    Str1 = UCase$(cArabicToRoman(Year(Int(Now)) - 1))
  2440.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  2441.    
  2442.    Str1 = UCase$(cArabicToRoman(Year(Int(Now)) + 1))
  2443.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  2444.  
  2445.    Value = Year(Int(Now))
  2446.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  2447.    Value = Year(Int(Now)) - 1
  2448.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  2449.    Value = Year(Int(Now)) + 1
  2450.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  2451.  
  2452.    txt_Result = strDisplay
  2453.  
  2454.    'time the function
  2455.  
  2456.    Str1 = Text1.Text
  2457.    
  2458.    TimerHandle = cTimerOpen()
  2459.    TimerStartOk = cTimerStart(TimerHandle)
  2460.    
  2461.    For i = 1 To Iteration
  2462.       strResult = cArabicToRoman(1996)
  2463.    Next i
  2464.    
  2465.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2466.    
  2467.    TimerCloseOk = cTimerClose(TimerHandle)
  2468.  
  2469. End Sub
  2470.  
  2471. Private Sub TestAsciiEbcdic()
  2472.    
  2473.    Dim intResult        As Integer
  2474.    Dim strResult        As String
  2475.    Dim strDisplay       As String
  2476.    
  2477.    Dim i                As Integer
  2478.    
  2479.    Dim Str1             As String
  2480.    Dim Str2             As String
  2481.    
  2482.    intResult = 0
  2483.    
  2484.    strResult = ""
  2485.    strDisplay = ""
  2486.    
  2487.    Str1 = Text1.Text
  2488.    Str2 = Str1
  2489.    Call cCnvASCIItoEBCDIC(Str2)
  2490.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2491.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2492.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2493.    Call cCnvEBCDICtoASCII(Str2)
  2494.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2495.  
  2496.    Str1 = "ABCDEFGH"
  2497.    Str2 = Str1
  2498.    Call cCnvASCIItoEBCDIC(Str2)
  2499.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2500.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2501.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2502.    Call cCnvEBCDICtoASCII(Str2)
  2503.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2504.  
  2505.    Str1 = "01234567890"
  2506.    Str2 = Str1
  2507.    Call cCnvASCIItoEBCDIC(Str2)
  2508.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2509.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2510.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2511.    Call cCnvEBCDICtoASCII(Str2)
  2512.    strDisplay = strDisplay & "'" & Str2 & "'"
  2513.  
  2514.    txt_Result = strDisplay
  2515.  
  2516.    'time the function
  2517.  
  2518.    Str1 = Text1.Text
  2519.    
  2520.    TimerHandle = cTimerOpen()
  2521.    TimerStartOk = cTimerStart(TimerHandle)
  2522.    
  2523.    For i = 1 To Iteration
  2524.       Call cCnvASCIItoEBCDIC(Str1)
  2525.    Next i
  2526.    
  2527.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2528.    
  2529.    TimerCloseOk = cTimerClose(TimerHandle)
  2530.  
  2531. End Sub
  2532.  
  2533. Private Sub TestPatternMatch()
  2534.    
  2535.    Dim intResult        As Integer
  2536.    Dim strResult        As String
  2537.    Dim strDisplay       As String
  2538.    
  2539.    Dim i                As Integer
  2540.    
  2541.    Dim Str1             As String
  2542.    Dim Str2             As String
  2543.    
  2544.    intResult = 0
  2545.    
  2546.    strResult = ""
  2547.    strDisplay = ""
  2548.    
  2549.    Str1 = "Under the blue sky, the sun lights"
  2550.  
  2551.    strDisplay = "PatternMatch '" & Str1 & "' with" & vbCrLf & vbCrLf
  2552.  
  2553.    Str2 = "*"
  2554.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2555.    Str2 = "*??*???*?"
  2556.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2557.    Str2 = "*Under*"
  2558.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2559.    Str2 = "*sky*"
  2560.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2561.    Str2 = "*lights"
  2562.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2563.    Str2 = "??der*sky*ligh??*"
  2564.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2565.    Str2 = "Under?the * s??,*"
  2566.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf
  2567.  
  2568.    Str2 = "*under*"
  2569.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2570.    Str2 = "Under*sun"
  2571.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  2572.    Str2 = "Under t??e*"
  2573.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf
  2574.  
  2575.    txt_Result = strDisplay
  2576.  
  2577.    'time the function
  2578.  
  2579.    Str2 = "Under?the * s??,*"
  2580.    
  2581.    TimerHandle = cTimerOpen()
  2582.    TimerStartOk = cTimerStart(TimerHandle)
  2583.    
  2584.    For i = 1 To Iteration
  2585.       intResult = cPatternMatch(Str1, Str2)
  2586.    Next i
  2587.    
  2588.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2589.    
  2590.    TimerCloseOk = cTimerClose(TimerHandle)
  2591.  
  2592. End Sub
  2593.  
  2594. Private Sub TestPatternExtMatch()
  2595.    
  2596.    Dim intResult        As Integer
  2597.    Dim strResult        As String
  2598.    Dim strDisplay       As String
  2599.    
  2600.    Dim i                As Integer
  2601.    
  2602.    Dim Str1             As String
  2603.    Dim Str2             As String
  2604.    
  2605.    intResult = 0
  2606.    
  2607.    strResult = ""
  2608.    strDisplay = ""
  2609.    
  2610.    Str1 = "Under the blue sky, the sun lights"
  2611.  
  2612.    strDisplay = "PatternExtMatch '" & Str1 & "' with" & vbCrLf & vbCrLf
  2613.    
  2614.    Str2 = "*"
  2615.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2616.    Str2 = "*??*???*?"
  2617.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2618.    Str2 = "*Under*"
  2619.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2620.    Str2 = "*sky*"
  2621.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2622.    Str2 = "*lights"
  2623.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2624.    Str2 = "??der*sky*ligh??*"
  2625.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2626.    Str2 = "Under?the * s??,*"
  2627.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2628.    Str2 = "'U-U''a-z''a-z''a-z''a-z'?the *"
  2629.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2630.    Str2 = "'U-U''!A-Z''^A-Z''^A-Z''!A-Z'?the *'s-s'"
  2631.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2632.    Str2 = "~55~6E*~73"
  2633.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2634.    Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rstu'"
  2635.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2636.    Str2 = "Under?the *'~72~73~74~75'"
  2637.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf
  2638.  
  2639.    Str2 = "*under*"
  2640.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2641.    Str2 = "Under*sun"
  2642.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2643.    Str2 = "Under t??e*"
  2644.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2645.    Str2 = "'U-U''!a-z''^A-Z''^A-Z''!A-Z'?the *'!s-s'"
  2646.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2647.    Str2 = "~55~6G*~73"
  2648.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2649.    Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rStu'"
  2650.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  2651.    Str2 = "Under?the *'~72~53~74~75'"
  2652.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf
  2653.  
  2654.    txt_Result = strDisplay
  2655.  
  2656.    'time the function
  2657.  
  2658.    Str2 = "Under?the * s??,*"
  2659.    
  2660.    TimerHandle = cTimerOpen()
  2661.    TimerStartOk = cTimerStart(TimerHandle)
  2662.    
  2663.    For i = 1 To Iteration
  2664.       intResult = cPatternExtMatch(Str1, Str2)
  2665.    Next i
  2666.    
  2667.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2668.    
  2669.    TimerCloseOk = cTimerClose(TimerHandle)
  2670.  
  2671. End Sub
  2672.  
  2673. Private Sub TestCheckNumericity()
  2674.    
  2675.    Dim intResult        As Integer
  2676.    Dim strResult        As String
  2677.    Dim strDisplay       As String
  2678.    
  2679.    Dim i                As Integer
  2680.    
  2681.    Dim Str1             As String
  2682.    
  2683.    intResult = 0
  2684.    
  2685.    strResult = ""
  2686.    strDisplay = ""
  2687.      
  2688.    Str1 = Text1.Text
  2689.    strDisplay = strDisplay & "'" & Str1 & "' is "
  2690.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  2691.    
  2692.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  2693.    strDisplay = strDisplay & "'" & Str1 & "' is "
  2694.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  2695.    
  2696.    Str1 = "1234567890"
  2697.    strDisplay = strDisplay & "'" & Str1 & "' is "
  2698.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  2699.    
  2700.    Str1 = "-1234567890"
  2701.    strDisplay = strDisplay & "'" & Str1 & "' is "
  2702.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  2703.    
  2704.    Str1 = "+12345.67890"
  2705.    strDisplay = strDisplay & "'" & Str1 & "' is "
  2706.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  2707.    
  2708.    txt_Result = strDisplay
  2709.  
  2710.    'time the function
  2711.  
  2712.    Str1 = Text1.Text
  2713.    
  2714.    TimerHandle = cTimerOpen()
  2715.    TimerStartOk = cTimerStart(TimerHandle)
  2716.    
  2717.    For i = 1 To Iteration
  2718.       intResult = cCheckNumericity(Str1)
  2719.    Next i
  2720.    
  2721.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2722.    
  2723.    TimerCloseOk = cTimerClose(TimerHandle)
  2724.  
  2725. End Sub
  2726.  
  2727. Private Sub TestAlphaDigit()
  2728.    
  2729.    Dim intResult        As Integer
  2730.    Dim strResult        As String
  2731.    Dim strDisplay       As String
  2732.    
  2733.    Dim i                As Integer
  2734.    
  2735.    Dim Str1             As String
  2736.    
  2737.    intResult = 0
  2738.    
  2739.    strResult = ""
  2740.    strDisplay = ""
  2741.      
  2742.    Str1 = "1234567890"
  2743.    
  2744.    strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf
  2745.    
  2746.    strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf
  2747.    
  2748.    strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf
  2749.    
  2750.    strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'" & vbCrLf & vbCrLf & vbCrLf
  2751.    
  2752.    Str1 = Text1.Text
  2753.    
  2754.    strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf
  2755.    
  2756.    strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf
  2757.    
  2758.    strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf
  2759.    
  2760.    strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'"
  2761.    
  2762.    txt_Result = strDisplay
  2763.  
  2764.    'time the function
  2765.  
  2766.    Str1 = Text1.Text
  2767.    
  2768.    TimerHandle = cTimerOpen()
  2769.    TimerStartOk = cTimerStart(TimerHandle)
  2770.    
  2771.    For i = 1 To Iteration
  2772.       intResult = cAddDigit(Str1)
  2773.    Next i
  2774.    
  2775.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2776.    
  2777.    TimerCloseOk = cTimerClose(TimerHandle)
  2778.  
  2779. End Sub
  2780.  
  2781. Private Sub TestH2X()
  2782.    
  2783.    Dim intResult        As Integer
  2784.    Dim strResult        As String
  2785.    Dim strDisplay       As String
  2786.    
  2787.    Dim i                As Integer
  2788.    
  2789.    Dim Str1             As String
  2790.    
  2791.    intResult = 0
  2792.    
  2793.    strResult = ""
  2794.    strDisplay = ""
  2795.      
  2796.    strDisplay = "Hexa to Integer" & vbCrLf & vbCrLf
  2797.  
  2798.    Str1 = "0"
  2799.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2800.    Str1 = "1"
  2801.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2802.    Str1 = "A"
  2803.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2804.    Str1 = "A1"
  2805.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2806.    Str1 = "A1B"
  2807.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2808.    Str1 = "7FFF"
  2809.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2810.    Str1 = "A1B2"
  2811.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  2812.    Str1 = "FFFF"
  2813.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf & vbCrLf
  2814.  
  2815.    strDisplay = strDisplay & "Hexa to Long" & vbCrLf & vbCrLf
  2816.  
  2817.    Str1 = "0"
  2818.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2819.    Str1 = "1"
  2820.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2821.    Str1 = "A"
  2822.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2823.    Str1 = "A1"
  2824.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2825.    Str1 = "A1B"
  2826.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2827.    Str1 = "A1B2"
  2828.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2829.    Str1 = "7FFFFFFF"
  2830.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2831.    Str1 = "B2A1A1B2"
  2832.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  2833.    Str1 = "FFFFFFFF"
  2834.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf & vbCrLf
  2835.    
  2836.    txt_Result = strDisplay
  2837.  
  2838.    'time the function
  2839.  
  2840.    Str1 = Text1.Text
  2841.    
  2842.    TimerHandle = cTimerOpen()
  2843.    TimerStartOk = cTimerStart(TimerHandle)
  2844.    
  2845.    For i = 1 To Iteration
  2846.       intResult = cH2I(Str1)
  2847.    Next i
  2848.    
  2849.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2850.    
  2851.    TimerCloseOk = cTimerClose(TimerHandle)
  2852.  
  2853. End Sub
  2854.  
  2855. Private Sub TestSortStr()
  2856.    
  2857.    Dim intResult        As Integer
  2858.    Dim strResult        As String
  2859.    Dim strDisplay       As String
  2860.    
  2861.    Dim i                As Integer
  2862.    
  2863.    Dim Str1             As String
  2864.    
  2865.    intResult = 0
  2866.    
  2867.    strResult = ""
  2868.    strDisplay = ""
  2869.      
  2870.    Str1 = Text1.Text
  2871.    Str1 = cResizeStringAndFill(Str1, 60, " ")
  2872.    strDisplay = strDisplay & "SortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2873.    intResult = cSortStr(Str1, 20, 3)
  2874.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  2875.  
  2876.    Str1 = "ABCBCABECAEB"
  2877.    strDisplay = strDisplay & "SortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2878.    intResult = cSortStr(Str1, 4, 3)
  2879.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf & vbCrLf
  2880.  
  2881.    Str1 = Text1.Text
  2882.    Str1 = cResizeStringAndFill(Str1, 60, " ")
  2883.    strDisplay = strDisplay & "ReverseSortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2884.    intResult = cReverseSortStr(Str1, 20, 3)
  2885.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  2886.  
  2887.    Str1 = "ABCBCABECAEB"
  2888.    strDisplay = strDisplay & "ReverseSortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2889.    intResult = cReverseSortStr(Str1, 4, 3)
  2890.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  2891.  
  2892.    txt_Result = strDisplay
  2893.  
  2894.    'time the function
  2895.  
  2896.    Str1 = Text1.Text
  2897.    
  2898.    TimerHandle = cTimerOpen()
  2899.    TimerStartOk = cTimerStart(TimerHandle)
  2900.    
  2901.    For i = 1 To Iteration
  2902.       strResult = cSortStr(Str1, 4, 3)
  2903.    Next i
  2904.    
  2905.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2906.    
  2907.    TimerCloseOk = cTimerClose(TimerHandle)
  2908.  
  2909. End Sub
  2910.  
  2911. Private Sub TestMorse()
  2912.    
  2913.    Dim intResult        As Integer
  2914.    Dim strResult        As String
  2915.    Dim strDisplay       As String
  2916.    
  2917.    Dim i                As Integer
  2918.    
  2919.    Dim Str1             As String
  2920.    
  2921.    intResult = 0
  2922.    
  2923.    strResult = ""
  2924.    strDisplay = ""
  2925.      
  2926.    Str1 = Text1.Text
  2927.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2928.  
  2929.    Str1 = "SOS"
  2930.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2931.    
  2932.    Str1 = "T2WIN-32"
  2933.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2934.    
  2935.    Str1 = "Nothing can beat the fox"
  2936.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2937.    
  2938.    txt_Result = strDisplay
  2939.  
  2940.    'time the function
  2941.  
  2942.    Str1 = Text1.Text
  2943.    
  2944.    TimerHandle = cTimerOpen()
  2945.    TimerStartOk = cTimerStart(TimerHandle)
  2946.    
  2947.    For i = 1 To Iteration
  2948.       strResult = cMorse(Str1)
  2949.    Next i
  2950.    
  2951.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2952.    
  2953.    TimerCloseOk = cTimerClose(TimerHandle)
  2954.  
  2955. End Sub
  2956.